package com.cartoon.adapter;

import android.view.View;
import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.cartoon.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import model.CarttonKKTypeModel;
import pic.PicLoadManager;

public class CarttonKKAdapter extends BaseQuickAdapter<CarttonKKTypeModel.DataBean.TopicsBean, BaseViewHolder> {
    public CarttonKKAdapter(int layoutResId, @Nullable @org.jetbrains.annotations.Nullable List<CarttonKKTypeModel.DataBean.TopicsBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CarttonKKTypeModel.DataBean.TopicsBean item) {

        ImageView iv_content_pig = helper.itemView.findViewById(R.id.iv_content_pig);
        PicLoadManager.loadPicture(item.getVertical_image_url(), iv_content_pig);
        helper.setText(R.id.tv_content_name,item.getTitle());
    }
}
